package com.wisewin.circle;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.wisewin.circle.system.Constants;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.Date;


@SpringBootApplication(exclude = {RedisAutoConfiguration.class})
@MapperScan(basePackages = {"com.wisewin.circle.dao"})
@EnableTransactionManagement
@EnableScheduling
@ServletComponentScan(basePackages = "com.wisewin.circle.api.listener")
@NacosPropertySource(dataId = "circle-activity", groupId = "DEFAULT_GROUP", autoRefreshed = true)
public class ApiApplication {

    public static void main(String[] args) {

        Constants.startTime = new Date();// 记录启动时间
        SpringApplication.run(ApiApplication.class, args);
    }

}
